<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <script>
        /* 
            代码块
        */

        {
            let a = 10;  // 局部变量、
            var b = 20;
            document.write(a);
            // document.write("\n");
        }

        // document.write(a);  // 访问不到
        document.write(b);
        {
            // document.write(a);  // 访问不到
            document.write(b);
        }
</script>
</head>
<body>
    
</body>
</html>